import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'

export default defineConfig(() => {
    return {
        base: './',
        build: {
            minify: true,
            outDir: 'dist',
        },
		server: {
			port: 3002,
			proxy: {
				'/api': {
					target: 'http://localhost:8091', // 目标服务  
					changeOrigin: true,
					rewrite: path => path.replace(/^\/api/, ''),
				}
			}
		},
        plugins: [
            uni()
        ],
        exclude:[
            /\/README\.md$/,
        ]
    }
})